1. Field of the Invention
The present invention relates to a method of and an apparatus for correcting the contour of a grayscale image, and more particularly to a method of and an apparatus for correcting the contour of a grayscale image of a subject which is generated by an image capturing device, based on the information of a distance image of the subject.
2. Description of the Related Art
Heretofore, there has generally been known a grayscale image, whose gradation values are represented by pixel values, generated when a subject is imaged by an image capturing device such as a digital camera, a video camera, or the like.
Distance image capturing apparatus have been proposed in recent years for capturing an image of an object space with an image capturing device and generating a distance image whose pixel value is represented by a distance value from the image capturing device to an object (subject) that is present in the object space (see Japanese Laid-Open Patent Publication No. 2006-153773 and Japanese Laid-Open Patent Publication No. 2006-046959).
A grayscale image correcting process has experimentally been carried out by obtaining a grayscale image and a distance image of a subject with an image capturing device and clipping and generating a grayscale image that exists in 2 m from the image capturing device based on the information of the distance image.
The process of correcting (processing) a grayscale image based on the information of a distance image is expected to be applied to a highly advanced security camera, a next-generation entering and leaving system sensor, a robot vision sensor, various FA sensors, etc.
A technology for extracting the contour of a distance image is disclosed in Japanese Laid-Open Patent Publication No. 2006-153773 referred to above. According to the disclosed technology, a moving body as an object and a background thereof are imaged a plurality of times to produce a distance image. In view of an overshooting caused around the distance image of the object, the distance image with the overshooting is smoothed, and a differential image between the smoothed distance image and the distance image with the overshooting is extracted as a contour.
Japanese Laid-Open Patent Publication No. 2006-046959 referred to above discloses an image capturing device comprising a light emission source for irradiating an object space with intensity-modulated light whose intensity changes periodically, a photodetector for capturing an image of the object space, the photodetector including an array of photosensitive elements for generating electric output signals depending on respective detected amounts of light, and an image generator for generating, from the detected amounts of light from the photosensitive elements, a distance image whose pixel values are represented by distance values by converting the phase difference of intensity-modulated light generated when the light radiated from the light emission source into the object space is reflected by an object in the object space and detected by the photosensitive elements, into a distance up to the object, and a grayscale image whose pixel values are represented by grayscale levels which represent the detected amounts of light from the photosensitive elements. The publication also discloses that a contour extractor extracts both a region in a differentiated grayscale image where the grayscale differential value is of a local maximum and a region in a differentiated distance image where the distance differential value is of a local maximum, as a contour of the object.